<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人简介</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            padding: 20px;
            display: flex;
            justify-content: center;
        }
        .container {
            max-width: 600px;
            margin: auto;
            border: 1px solid #ccc;
            padding: 20px;
            border-radius: 10px;
            background-color: #fff;
        }
        .title {
            text-align: center;
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 20px;
        }
        .info {
            margin: 10px 0;
        }
        .label {
            font-weight: bold;
            display: inline-block;
            width: 80px;
        }
        .avatar img {
            max-width: 100px;
            border-radius: 50%;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="title">个人简介</div>

    <div class="info avatar">
        <span class="label">头像：</span>
        <%
            String avatarFileName = (String) request.getAttribute("avatarFileName");
            if (avatarFileName != null && !avatarFileName.isEmpty()) {
                String avatarUrl = "uploads/" + avatarFileName;
        %>
        <img src="<%= avatarUrl %>" alt="头像">
        <%
        } else {
        %>
        <span>没有上传头像</span>
        <%
            }
        %>
    </div>
    <div class="info">
        <span class="label">姓名：</span><%= request.getAttribute("name") %>
    </div>
    <div class="info">
        <span class="label">性别：</span><%= request.getAttribute("gender") %>
    </div>
    <div class="info">
        <span class="label">年龄：</span><%= request.getAttribute("age") %>
    </div>
    <div class="info">
        <span class="label">专业：</span><%= request.getAttribute("major") %>
    </div>
    <div class="info">
        <span class="label">联系方式：</span><%= request.getAttribute("phone") %>
    </div>
    <div class="info">
        <span class="label">身份证号：</span><%= request.getAttribute("idCard") %>
    </div>
    <div class="info">
        <span class="label">学院：</span><%= request.getAttribute("college") %>
    </div>
    <div class="info">
        <span class="label">班级：</span><%= request.getAttribute("className") %>
    </div>


</div>
</body>
</html>
